import wave
from piper import PiperVoice

tts_onnx_path="en_US-lessac-medium.onnx"
voice = PiperVoice.load(tts_onnx_path)
with wave.open("test.wav", "wb") as wav_file:
    voice.synthesize_wav("Welcome to the world of speech synthesis!", wav_file)
    
    